Sequelize 的 createdAt 時間不對


Posted by Rich on 2021-09-15


createdAt 的時間不是真實新增資料的時間。
原因:sequelize 存取的時間是按照 UTC 標準時間,所以我們需要調整一下時區。

在 config 下面的 config.json 裡面新增一行 timezone: "+08:00" 就可以解決。但如果你跟我是不一樣的時區就要再調整囉~










Related Posts

Debug Windows Service

Debug Windows Service

Day 03:  GraphQL and GiHub GrapQL - Operations, Variables, and Mutations

Day 03: GraphQL and GiHub GrapQL - Operations, Variables, and Mutations

25. Design Principles - SOLID

25. Design Principles - SOLID


Comments